package com.haichang.demomybatis.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("GOODS")
public class Goods {
    @TableId(type = IdType.AUTO)
    private int gid;
    private String gname;
    private double gprice;
    private int gnum;

    public Goods() {
    }
    public Goods(int id, String name, double price, int gnum) {
        this.gid = id;
        this.gname = name;
        this.gprice = price;
        this.gnum = gnum;
    }
    public int getGid() {
        return gid;
    }
    public void setGid(int id) {
        this.gid = id;
    }
    public String getGname() {
        return gname;
    }
    public void setGname(String name) {
        this.gname = name;
    }
    public double getGprice() {
        return gprice;
    }
    public void setGprice(double price) {
        this.gprice = price;
    }
    public int getGnum() {
        return gnum;
    }
    public void setGnum(int gnum) {
        this.gnum = gnum;
    }
    @Override
    public String toString() {
        return "Goods [id=" + gid 
            + ", name=" + gname 
            + ", price=" + gprice 
            + ", gnum=" + gnum + "]";
    }

    
}
